package default01;

/**
 * @TODO
 * @Author xu
 * 2025/3/15
 */
public class User {
    private String username;
    private String password;

    // 构造函数
    public User(String username, String password) {
        this.username = username;
        this.password = password;
    }

    // 获取用户名
    public String getUsername() {
        return username;
    }

    // 获取密码
    public String getPassword() {
        return password;
    }

    // 用于比较用户对象的信息
    public boolean matches(String username, String password) {
        return this.username.equals(username) && this.password.equals(password);
    }
}
